import * as BROWSER from '@/store/mutations/browser'
import * as FORM from '@/store/mutations/form'
import * as LANGUAGE from '@/store/mutations/language'
import * as MEDIA_LIBRARY from '@/store/mutations/media-library'

/* Mutations that must trigger a change in the form need to be listed here */
export const FORM_MUTATIONS_TO_SUBSCRIBE = [
  FORM.UPDATE_FORM_PERMALINK,
  FORM.UPDATE_FORM_FIELD,
  FORM.REMOVE_FORM_FIELD,
  FORM.ADD_FORM_BLOCK,
  FORM.DELETE_FORM_BLOCK,
  FORM.DUPLICATE_FORM_BLOCK,
  FORM.REORDER_FORM_BLOCKS,
  FORM.UPDATE_MODAL_FIELD,
  LANGUAGE.SWITCH_LANG,
  MEDIA_LIBRARY.SET_MEDIA_CROP,
  MEDIA_LIBRARY.SET_MEDIA_METADATAS,
  MEDIA_LIBRARY.SAVE_MEDIAS,
  MEDIA_LIBRARY.DESTROY_MEDIAS,
  MEDIA_LIBRARY.DESTROY_SPECIFIC_MEDIA,
  MEDIA_LIBRARY.REORDER_MEDIAS,
  BROWSER.SAVE_ITEMS,
  BROWSER.DESTROY_ITEMS,
  BROWSER.DESTROY_ITEM,
  BROWSER.REORDER_ITEMS
]

export default {
  FORM_MUTATIONS_TO_SUBSCRIBE
}
